FIG. 4 illustrates an example of a conventional photoelectric sensor having the function of adjusting the amplification gain of the received light intensity. The photoelectric sensor in this example is a reflective-type sensor including a light projecting unit 2 including a light projecting element (LED) 20, and a photo IC chip IT including a light receiving element 10 (a photodiode), which are incorporated in a single casing. The photo IC chip 1T includes a light-projection control part (a light-projection controller) 11, an I/V converter part (an I/V converter) 12, a preamplifier 13, a main amplifier 15, a comparator part (a comparator) 16, a signal processing part (a signal processor) 17, an output part (an outputter) 18, and the like. Further, a variable resistor 100 and a capacitor 110 are externally attached to the photo IC chip 1T. In the figure, the I/V converter part 12, the preamplifier 13, the main amplifier 15, the variable resistor 100, and the capacitor 110 constitute an amplification processing part (amplification processor) for amplifying received light intensity signals, and the comparator part 16 and the signal processing part 17 constitute a detection processing part (detection processor) for performing detection processing using the amplified received light intensity signals.
The light-projection control part 11 is connected to the signal processing part 17 and is also connected to the light projecting unit 2 through a terminal T1. The output part 18 is connected to an output circuit (not illustrated), through a terminal T2. An output line from the preamplifier 13 is connected to a first fixed terminal a of the variable resistor 100 through a terminal T11, and an input line to the main amplifier 15 is connected to a first electrode of the capacitor 110 through a terminal T12. The variable resistor 100 has a second fixed terminal b which is grounded and has a movable terminal c which is connected to a second electrode of the capacitor 110.
The LED 20 of the light projecting unit 2 is caused to emit light, by receiving driving pulses supplied thereto from the signal processing part 17 through the light-projection control part 11. The photodiode 10 generates a received light intensity signal (a current signal) through photoelectric conversion. The received light intensity signal (the current signal) is converted into a voltage signal by the I/V converter part 12, and the voltage signal is amplified by the preamplifier 13. The output from the preamplifier 13 is subjected to a voltage division by the variable resistor 100 and a signal resulted from the voltage drop between the terminals c and b is inputted to the main amplifier 15 to be amplified.
The movable terminal c of the variable resistor 100 is moved between the terminals a and b, along with the rotation of a rotational part, which is not illustrated. Along with the change of the position thereof, the ratio between the resistance between the terminals a and c and the resistance between the terminals c and b is changed and, along therewith, the received light intensity signal is changed, in level, before it is inputted to the main amplifier.
The rotational part of the variable resistor 100 is rotated through rotating manipulations performed by a user. In this example of the conventional photoelectric sensor, within the range of the rotation of the rotational part, a tick mark of 0 is assigned to an end-edge position at which the movable terminal c is made closest to the fixed terminal b, and tick marks are assigned at even intervals, such that they have values gradually increasing, such as “1, 2, 3 . . . ”, with decreasing distance to the other end. As the amount of the rotation of the rotational part with respect to the tick mark of 0 is increased, the movable terminal c gets farther away from the fixed terminal b, which increases the ratio of the resistance between the terminals c and b to the resistance between the terminals a and c. This resistance change results in a linear change in the displacement of the movable terminal c (which means a change substantially proportional to the distance between the terminals c and b). The level of the signal inputted to the main amplifier 15 exhibits a similar change.
The preamplifier 13 and the main amplifier 15 are set to have constant gains and, therefore, the ratio Vout/Vin of the level Vout of the signal outputted from the main amplifier to the level Vin of the signal inputted to the preamplifier 13 (the gain of the entire amplification processing part) is also changed linearly with respect to the movement of the movable terminal c.
However, when the gain of the received light intensity changes linearly with respect to the displacement of the movable terminal c, the gain change rate while the movable terminal c is moved is varied depending on the position of the terminal c during the movement. For example, FIG. 5 illustrates a graph representing the relationship between the gain of the received light intensity and the position of the movable terminal c, which is indicated by respective tick marks, wherein a straight line A indicates an example of a linear change, assuming that the range of the rotation of the rotational part is evenly divided by tick marks of 0 to 10.
The straight line A is normalized such that the maximum value of Vout/Vin is 1.0, and the gain changes in steps of 0.1 with respect to the movement of the movable terminal c by an amount corresponding to a single tick mark. Accordingly, if the movable terminal c is moved from the position corresponding to the maximum tick mark of 10 to the position corresponding to the tick mark smaller there than by a single step, namely the tick mark of 9, the gain changes from 1.0 to 0.9, wherein the ratio of the gain after being changed to the gain before being changed is −10%. On the other hand, if the movable terminal c is moved from the position corresponding to the tick mark of 2 to the position corresponding to the tick mark of 1, the gain changes from 0.2 to 0.1, wherein the ratio of the gain after being changed to the gain before being changed is −50%.
The received light intensity in the photoelectric sensor increases with decreasing detection distance. When the detection distance is shorter, and the received light intensity is made larger, it is necessary that the amount of movement of the movable terminal c with respect to the fixed terminal b be made smaller (namely, it is necessary that the rotational part be set to a tick mark, within a range in which there are tick marks having smaller values), in order to make the gain smaller, while it is necessary to finely adjust the gain in order to ensure high detection accuracy. However, regarding the relationship represented by the straight line A in FIG. 5, if the rotational part is set to a tick mark within the range in which there are tick marks having smaller values, in order to make the gain smaller, the gain is largely changed even by a smaller amount of movement of the rotational part, which makes it hard to finely adjust the sensitivity.
As a method for overcoming the problem, there has been suggested connecting a correction resistor 200 in parallel to the variable resistor 100 for bringing the gain change with respect to the movement of the movable terminal c close to an exponential change, as illustrated in FIG. 6 (refer to Japanese Utility Model (Registration) Application Laid-Open Publication No. 6-54322, and Japanese Utility Model (Registration) Application Laid-Open Publication No. 7-43007).
A curve B in FIG. 5 represents an example of a case where the gain changes exponentially with respect to the movement of the movable terminal c. Regarding the relationship represented by the curve, regardless of the position from which the movable terminal c is moved, the movement thereof by an amount corresponding to a single tick mark causes a gain change at a rate of about 50% of the gain value before the movement. This enables the user to adjust the gain, with the recognition that the gain is doubled by increasing the amount of the rotation of the rotational part by an amount corresponding to a single tick mark, and the gain is halved by decreasing the amount of the rotation thereof by an amount corresponding to a single tick mark. This allows the user to easily recognize the degree of the adjustment. Furthermore, the gain can be made to have a smaller value, while the rotational part is set to a tick mark within the range in which there are tick marks having smaller values. This makes it easier to finely adjust the gain, when the detection distance is shorter and, thus, the received light intensity is larger.
With the circuit having the structure including the correction resistor 200 illustrated in FIG. 6, it is possible to realize gain changes closer to exponential changes, but it is impossible to provide a completely-exponential characteristic. Under conditions where smaller amounts of manipulations are performed through sensitivity adjustment manipulations, the gain still has a relatively-higher value and, also, the gain change rate with respect to manipulations cannot be made constant. Therefore, the structure is insufficient to overcome the inconvenience in gain adjustments.